[WC-3418] Combobox accessibility improvements#2281
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
0d5657e to
d1fded1
Compare
This comment has been minimized.
This comment has been minimized.
|
|
||
| await waitFor(() => { | ||
| const spinner = component.container.querySelector(".widget-combobox-spinner"); | ||
| if (spinner) { |
There was a problem hiding this comment.
@leonardomendix, can we avoid this if? How do you think?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
a14d634 to
093bcff
Compare
This comment has been minimized.
This comment has been minimized.
b300d09 to
40fdaaa
Compare
This comment has been minimized.
This comment has been minimized.
40fdaaa to
44c2413
Compare
AI Code Review
What was reviewed
Skipped (out of scope): Findings🔶 Medium — CI check failing: "Verify changelog entries" + lint warningsFile: This is the spinner test that wraps // line ~280-284
if (spinner) {
expect(spinner).not.toHaveAttribute("aria-hidden", "true");
}If // Option A — assert it exists first
const spinner = component.container.querySelector(".widget-combobox-spinner");
expect(spinner).toBeInTheDocument();
expect(spinner).not.toHaveAttribute("aria-hidden", "true");
// Option B — if the spinner may not render, skip the test
// and add a note explaining the conditionFix: Remove the conditional 🔶 Medium —
|
Pull request type
Bug fix (non-breaking change which fixes an issue)
Description
Fixes two WCAG accessibility violations in the combobox widget.
aria-hidden="true"to DownArrow and ClearButton icon wrappers to prevent "image" announcements<ul>now only renders when open, preventing screen readers from navigating to empty groupsWhat should be covered while testing?
Screen Reader Testing:
Functional Testing: